-
Couldn't load subscription status.
- Fork 60
Change philox state API usage to support XPU graph #2085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates the XPU implementation to use the new philox_xpu_state API instead of the legacy philox_engine_inputs API to support XPU graph functionality. The changes replace the old pair-based approach for Philox random number generation with a unified state object.
- Replace
philox_engine_inputs()calls withphilox_xpu_state() - Update function signatures to use
PhiloxXpuStateinstead ofstd::pair<uint64_t, uint64_t> - Replace
philox_unpack()withat::xpu::philox::unpack()
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/ATen/native/xpu/sycl/RreluWithNoiseKernels.cpp | Updates RReLU with noise kernel to use new philox state API |
| src/ATen/native/xpu/sycl/RandpermKernel.cpp | Updates randperm kernel to use new philox state API and removes unused include |
| src/ATen/native/xpu/sycl/MultinomialKernel.cpp | Updates multinomial kernel to use new philox state API |
| src/ATen/native/xpu/sycl/Dropout.cpp | Updates dropout kernels to use new philox state API |
| src/ATen/native/xpu/sycl/Distributions.cpp | Updates various distribution kernels to use new philox state API |
| src/ATen/native/xpu/sycl/DistributionTemplates.h | Removes PhiloxState definition and updates template functions to use new API |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Signed-off-by: Ma, Jing1 <[email protected]>
|
I assume the existing cases already cover this change, right? @majing921201 |
yes |
|
Try to land... |
Switch philox_engine_inputs usage to philox_xpu_state per XPU graph request. This PR requires stock pytorch XPUGeneratorImpl PR merged.